//
/***********************************************************
             File name:      main.c
             Author:         Bitat (陆叁柒)
             Email :         Bitat@qq.com
             Gitee :         https://gitee.com/bitat
             CSDN  :         https://blog.csdn.net/bitat 
             History:        2023/3/25
************************************************************/
    
#include <stdlib.h>
#include <stdio.h>


//数字逆序
void reverse_order(int input)
{
    if(input%10 == 0 && input != 0)
    {
        while(input%10 == 0)
        {
            input = input/10;
        }
    }
    while(abs(input) > 10)
    {
        printf("%d",input%10);
        if(input > 0)
        {
            input = input / 10;
        }
        else
        {
            input = -input / 10;
        }
    }
    printf("%d\n",input);
    
}

int main()
{
    int input = 0;
    scanf("%d",&input);
    reverse_order(input);
    
    return 0;
}
